# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-polib
_pkgname=polib
pkgver=1.2.0
pkgrel=1
pkgdesc="library to manipulate gettext files"
url="https://polib.readthedocs.org/en/latest/index.html"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

replaces=py-polib # Backwards compatibility
provides=py-polib=$pkgver-r$pkgrel # Backwards compatibility

options="!check" # tests broken

build() {
	python3 setup.py build
}

check() {
	python3 tests/tests.py
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
b325730cd4df6c881ffcab72da1796eb2949243f6060c650209e1c6584e5344ecaede870f22ece00f5c74bcd289fa5d2aa5223b88cb78de0dff5f9e41759096e  polib-1.2.0.tar.gz
"
